from dataclasses import dataclass
from datetime import datetime
from pathlib import Path
from typing import Dict, List, Optional

@dataclass
class PackageMetadata:
    name: str
    version: str
    description: str
    author: str
    homepage: str
    license: str
    dependencies: Dict[str, str]
    checksum: str
    size: int
    created_at: datetime
    platform: str
    python_version: str
    entry_points: Dict[str, str]

@dataclass
class InstalledPackage:
    metadata: PackageMetadata
    install_path: Path
    install_date: datetime
    status: str
    files: List[str]

@dataclass
class PackageCache:
    path: Path
    checksum: str
    timestamp: datetime
    size: int